#导包
import requests
#发送接口请求
#resp = requests.get(url="http://127.0.0.1/index.php/Home/Goods/search.html",
#                  params={"q":"iphone"})
#查看响应数据
#print(resp.text)

#第二种写法
resp = requests.get(url="http://127.0.0.1/index.php/Home/Goods/search.html?q=iphone")
print(resp.text)